//
//  BCMHelper.h
//  通用框架
//
//  Created by 马腾威 on 16/6/30.
//  Copyright © 2016年 马腾威. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface BCMHelper : NSObject
//计算文本高度
+ (CGFloat)heightOfConttent:(NSString*)content fontName:(NSString*)fontName fontSize:(CGFloat)fontSize maxWidth:(CGFloat)maxWidth;
//计算文本宽度
+ (CGFloat)widthOfConttent:(NSString*)content fontName:(NSString *)fontName fontSize:(CGFloat)fontSize maxHeight:(CGFloat)maxHeight;
//计算不失真的图片高度
+ (CGSize)calculteImageSizeOrignilWidth:(NSString*)orignilWidth orignilHeight:(NSString*)orignilHeight needWidth:(CGFloat)width;
//转换时间为字符串
+ (NSString *)dateChangeToString:(NSDate*)date;
//字符串类型转时间类型
+ (NSDate*)stringChangeToDate:(NSString*)string;

//通过日期拿到星期
+ (NSString*)weekdayStringFromDate:(NSDate*)inputDate;

// 通过日期拿到月份
+ (NSString *)monthSringFromDate:(NSDate *)inputDate;

//获取N个月前跟N个月后的日期
+(NSString *)getPriousorLaterDateFromDate:(NSDate *)date withMonth:(NSInteger)month;

//16进制转RGB 字符串举例：@“#FF0000”
+ (UIColor*)converFromStringColorToRGBColor:(NSString*)stringColor;
/**
 *  传入image和size 获得切割后的图片
 *
 *  @param image 原图
 *  @param size  切割的size
 *
 *  @return 切割后的图片
 */
+ (UIImage*) OriginImage:(UIImage*)image scaleToSize:(CGSize)size;

#pragma mark -  正则匹配设备号 -
+ (BOOL)checkDeviceNum:(NSString *)deviceNum;

#pragma mark - 正则匹配手机号 -
+ (BOOL)checkPhoneNum:(NSString *)phoneNum;

#pragma mark - 正则匹配身份证号 -
+ (BOOL)checkIDCardNum:(NSString *)IDCardNum;

#pragma mark - 正则匹配邮箱 -
+ (BOOL)checkEmail:(NSString *)Email;
#pragma mark - 字符串判空 -
+ (BOOL)isBlankString:(NSString *)string;
/**
 *  价格部分，把string转成AttributedString
 *
 *  @param string 传入的NSString
 *
 *  @return 生成的AttributedString
 */
+ (NSMutableAttributedString*)convertString:(NSString*)string;

@end
